package com.server.mine.net;

import java.util.HashMap;
import java.util.Map;

public class HttpProtocol {
	//请求字典
	public static Map<Integer, String> httpMap = new HashMap<Integer, String>();
	
	//通用客户端请求
	public static final int GETSERVERTIME = 0x00000000;//获取服务器时间
	public static final int GETOPENID = 0x00000001;//获取OPENID
	public static final int GETOPENGID = 0x00000002;//获取OPENGID
	public static final int GETSWITCH = 0x00000003;//获取游戏开关
	public static final int GETUID = 0x00000004;//获取游戏开关
	public static final int SAVEDATA = 0x00000005;//保存获取数据
	public static final int GETDATA = 0x00000006;//获取数据
	public static final int PUTRANKDATA = 0x00000007;//上传排行榜数据
	public static final int GETRANKLIST = 0x00000008;//获取排行榜
	public static final int JUDGENAME = 0x00000009;//检测名字是否占用
	public static final int ADDNAME = 0x0000000A;//插入已使用的名字
	public static final int BINDUSER = 0x0000000B;//绑定帐号密码
	public static final int USERLOGIN = 0x0000000C;//通过帐号密码登陆
	public static final int GETEDATA = 0x0000000D;//获取数据
	
	//后台请求
	public static final int LOGINACCOUNT= 0x00000100;//管理员登录
	public static final int ADDACCOUNT = 0x00000101;//添加管理员
	public static final int GETACCOUNTLIST= 0x00000102;//获取管理员列表
	public static final int CHANGEACCOUNTPASSWORD= 0x00000103;//获取管理员列表
	public static final int DELACCOUNT = 0x00000104;//删除管理员
	public static final int ADDAPP = 0x00000105;//添加管理员
	public static final int GETAPPLIST = 0x00000106;//添加管理员
	public static final int GETAPPRESLIST = 0x00000107;//添加管理员
	public static final int ADDAPPPOWER = 0x00000108;//添加管理员应用权限
	public static final int DELAPPPOWER = 0x00000109;//删除管理员应用权限
	public static final int CHANGEWXAPPID = 0x0000010A;//修改微信appid
	public static final int CHANGEWXSECRET = 0x0000010B;//修改微信secret
	public static final int GETSWICTHLIST = 0x0000010C;//修改微信secret
	public static final int SETSWITCH1 = 0x0000010D;//打开/关闭开关
	public static final int SETSWITCH2 = 0x0000010E;//打开/关闭开关
	public static final int SETSWITCH3 = 0x0000010F;//打开/关闭开关
	public static final int SETSWITCH4 = 0x00000110;//打开/关闭开关
	public static final int SETSWITCH5 = 0x00000111;//打开/关闭开关
	public static final int ADDRANKLIST = 0x00000112;//添加排行榜
	public static final int GETALLRANKLIST = 0x00000113;//获取全部排行榜列表
	public static final int REFRESHRANKLIST = 0x00000114;//刷新排行榜
	public static final int GETAPPREGIERTERRANK = 0x00000115;//刷新排行榜
	public static final int GETAPPGAMERANK = 0x00000116;//刷新排行榜
	public static final int BGGETRANKLIST = 0x00000117;//后台获取排行榜
	public static final int REDEEMCODE = 0x00000118;//校验兑换码
	public static final int USEREDEEMCODE = 0x00000119;//使用兑换码
	public static final int ADDHTWX = 0x0000011A;//添加微信互推程序
	public static final int GETHTWXLIST = 0x0000011B;//获取微信互推程序列表
	public static final int CHANGEHTWX = 0x0000011C;//修改微信互推程序信息
	public static final int ADDHTZJ = 0x0000011D;//添加字节互推程序
	public static final int GETHTZJLIST = 0x0000011E;//获取字节互推程序列表
	public static final int CHANGEHTZJ = 0x0000011F;//修改字节互推程序信息
	public static final int SETMATCHADJUST = 0x00000120;//修改赛季调整期开关
	
	//统计API请求
	public static final int APPSTATISLOGIN = 0x00000200;//登录/注册App统计
	
	//支付请求
	public static final int OPPOPAYREQ = 0x00000500;//oppo发送支付请求
	public static final int OPPOPAYRES = 0x00000501;//oppo接收支付回调
	public static final int OPPORESUME = 0x00000502;//oppo恢复购买
	
	/**
	 * Http服务必须在此处进行注册
	 */
	public static void HttpRegister() {
		//通用游戏请求
		httpMap.put(GETSERVERTIME, "GetServerTime");
		httpMap.put(GETOPENID, "GetOpenId");
		httpMap.put(GETOPENGID, "GetOpenGID");
		httpMap.put(GETSWITCH, "GetSwitch");
		httpMap.put(GETUID, "GetUID");
		httpMap.put(SAVEDATA, "SaveData");
		httpMap.put(GETDATA, "GetData");
		httpMap.put(PUTRANKDATA, "PutRankData");
		httpMap.put(GETRANKLIST, "GetRanklist");
		httpMap.put(BINDUSER, "Client_BindUser");
		httpMap.put(USERLOGIN, "Client_LoginFromUname");
		httpMap.put(GETEDATA, "GetEquimentData");
		
		//后台请求
		httpMap.put(LOGINACCOUNT, "LoginAccount");
		httpMap.put(ADDACCOUNT, "AddAccount");
		httpMap.put(GETACCOUNTLIST, "GetAccountList");
		httpMap.put(CHANGEACCOUNTPASSWORD, "ChangeAccountPassword");;
		httpMap.put(DELACCOUNT, "DelAccount");
		httpMap.put(ADDAPP, "AddApp");
		httpMap.put(GETAPPLIST, "GetAppList");
		httpMap.put(GETAPPRESLIST, "GetAppResList");
		httpMap.put(DELAPPPOWER, "DeleteAppPower");
		httpMap.put(CHANGEWXAPPID, "ChangeWxAppid");
		httpMap.put(CHANGEWXSECRET, "ChangeWxSecret");
		httpMap.put(GETSWICTHLIST, "GetAppSwitchList");
		httpMap.put(ADDAPPPOWER, "AddAppPower");
		httpMap.put(SETSWITCH1, "SetSwitch_1");
		httpMap.put(SETSWITCH2, "SetSwitch_2");
		httpMap.put(SETSWITCH3, "SetSwitch_3");
		httpMap.put(SETSWITCH4, "SetSwitch_4");
		httpMap.put(SETSWITCH5, "SetSwitch_5");
		httpMap.put(ADDRANKLIST, "AddAppRanklist");
		httpMap.put(GETALLRANKLIST, "GetAllRanklist");
		httpMap.put(REFRESHRANKLIST, "RefreshRankList");
		httpMap.put(GETAPPREGIERTERRANK, "GetAppRegisterRank");
		httpMap.put(GETAPPGAMERANK, "GetAppGameRank");
		httpMap.put(BGGETRANKLIST, "BGGetRanklist");
		httpMap.put(REDEEMCODE, "Redeem");
		httpMap.put(USEREDEEMCODE, "UseRedeem");
		httpMap.put(JUDGENAME, "JudgeName");
		httpMap.put(ADDNAME, "AddName");
		httpMap.put(SETMATCHADJUST, "SetMatchAdjust");
		
		//统计API
		httpMap.put(APPSTATISLOGIN, "AppLoginStatis");
		
		//支付API
		httpMap.put(OPPOPAYREQ, "Client_OPPOPayReq");
		httpMap.put(OPPOPAYRES, "Client_OPPOPayRes");
	}
}
